package com.kingint.mbg.ser.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kingint.mbg.dto.department.DepartmentQueryParam;
import com.kingint.mbg.dto.department.DepartmentRepairFront;
import com.kingint.mbg.dto.department.DepartmentRepairParam;
import com.kingint.mbg.ser.entity.SerDepartmentRepair;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 部门保修表 Mapper 接口
 * </p>
 *
 * @author wxh
 * @since 2020-12-20
 */
public interface SerDepartmentRepairMapper extends BaseMapper<SerDepartmentRepair> {

    /**
     * 根据酒店id，工单类型，当前状态查询工单信息
     * @param hotelId
     * @param workTypeId
     * @param status
     * @return
     */

    List<DepartmentRepairFront> getFrontRepairList(@Param("hotelId") Integer hotelId,@Param("workTypeId") Integer workTypeId,@Param("status") Integer status);

    /**
     * 查询用户相关的维修工单信息
     * @param hotelId
     * @param workTypeId
     * @param status
     * @param userId
     * @return
     */

    List<DepartmentRepairFront> getUserRepairList(@Param("hotelId") Integer hotelId,@Param("workTypeId") Integer workTypeId,@Param("status") Integer status,@Param("userId") Long userId);
    /**
     * 查询部门维修订单详情
     * @param workId
     * @return
     */
    DepartmentRepairParam getDepartmentRepairById(@Param("workId") Integer workId);


    /**
     * 分页查询部门维修订单信息（后台使用）
     * @param page
     * @param queryParam
     * @return
     */
    IPage<SerDepartmentRepair> getAllDepartmentList(IPage<SerDepartmentRepair> page,@Param("query") DepartmentQueryParam queryParam);

}
